.TH GQFUSE 1 "25 September 2012" "WFDB 10.5.15" "WFDB Applications Guide"
.SH NAME
gqfuse \- combine QRS annotation files
.SH SYNOPSIS
\fBgqfuse -r\fR \fIrecord\fR -a \fIannotator1 annotator2 ...\fR [ \fIoptions\fR ... ]
.SH DESCRIPTION
.PP
\fBgqfuse\fR produces a QRS annotation file based on two or more input QRS
annotation files with annotator names \fIannotator1\fR, \fIannotator2\fR, etc.
Each one-minute segment of the output annotation file is a copy of the
corresponding segment of one of the input annotation files.  In each segment,
the program copies the input that best matches a predicted heart rate.  If
there are N inputs, the prediction is the median of N+1 values (the previous
prediction and the number of beats marked within the current segment of each of
the N input files).  Although this process allows the input to be switched once
per minute, the policy for resolving ties (within 2 beats) favors not switching
if the previously chosen input is one of those belonging to the tie.
.PP
As its name suggests, \fBgqfuse\fR is intended to be used as a companion to the
\fBgqrs\fR(1) QRS detector, but it is able to process annotations from any beat
detector.  Non-beat annotations (e.g., rhythm, signal quality, artifact,
non-QRS waveforms, and notes) are copied to the output if present in the best
matching input segments, but they are not counted as beats by \fBgqfuse\fR when
it makes heart rate predictions.
.PP
One way to use \fBgqfuse\fR is to combine input annotation files for each
available ECG signal in a record, made using a single detector such as
\fBgqrs\fR.  Another is to combine input annotation files made using a
variety of QRS detectors.  These ideas can be combined as desired.
.PP
A configuration file, which can be shared with \fBgqrs\fR and \fBgqpost\fR(1),
can be used to specify the expected heart rate.  (In future versions, other
parameters in the configuration file may also be used by \fBgqfuse\fR).  The
configuration file is unnecessary when processing adult human ECGs, but an
appropriately constructed configuration file allows \fBgqrs\fR to analyze
fetal, pediatric, and animal ECGs.
.PP
\fIOptions\fR include:
.TP
\fB-c\fR \fIfile\fR
Initialize parameters based on the specified (text) configuration
\fIfile\fR.  See the example configuration file, \fIgqrs.conf\fR, for details.
.TP
\fB-h\fR
Print a usage summary.
.TP
\fB-o\fR \fIname\fR
Write annotations to an annotation file with the specified annotator \fIname\fR
(default: \fBgqf\fR).
.SH ENVIRONMENT
.PP
It may be necessary to set and export the shell variable \fBWFDB\fR (see
\fBsetwfdb\fR(1)).
.SH SEE ALSO
\fBgqrs\fR(1), \fBecgpuwave\fR(1), \fBsetwfdb\fR(1),
\fBsqrs\fR(1), \fBwqrs\fR(1)
.SH AUTHORS
George B. Moody (george@mit.edu).
.SH SOURCES
http://www.physionet.org/physiotools/wfdb/app/gqfuse.c
.br
http://www.physionet.org/physiotools/wfdb/app/gqrs.conf
